package com.yunxi.service.localService.impl.sto;

import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.dao.sto.StoStorageMonitorMapper;
import com.yunxi.model.sto.StoManage;
import com.yunxi.service.localService.sto.StoStorageMonitorService;
import com.yunxi.sto.pojo.StoStorageMonitorDetailVO;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * <p>
 * 库容监控 服务实现类
 * </p>
 *
 * @author caoYong
 * @since 2019-05-22
 */
@Service
public class StoStorageMonitorServiceImpl extends ServiceImplPlus<StoStorageMonitorMapper, StoManage> implements StoStorageMonitorService {

    @Override
    public List list() {
        return baseMapper.list();
    }

    @Override
    public StoStorageMonitorDetailVO detail(String storageCode) {
        StoStorageMonitorDetailVO detail = null;
        detail = baseMapper.detail(storageCode);
        List<StoStorageMonitorDetailVO> stoStorageMonitorDetailVOS = baseMapper.detailList(storageCode);
        if(detail != null){
            detail.setStorageDetailList(stoStorageMonitorDetailVOS);
        }
        return detail;
    }
}
